import request from '@/utils/request'
export default{
    //条件查询带分页查询课程
    getCourseList(page,limit,searchObj){
        return request({
            url:`/eduservice/coursefront/getFrontCourseList/${page}/${limit}`,
            method:'post',
            data:searchObj
        })
    },
    //查询所有分类的方法
    getAllSubject(){
        return request({
            url:`/eduservice/subject/getAllSubject`,
            method:'get'
        })
    },
    //课程详情方法
    getCourseInfo(id){
        return request({
            url:`/eduservice/coursefront/getFrontCourseInfo/${id}`,
            method:'get'
        })
    },
    //========================对于课程评论的操作===================
    getPageComment(page,limit,courseId){
        return request({
            url:`/eduservice/educomment/getPageComment/${page}/${limit}/${courseId}`,
            method:'get'
        })
    },
    addComment(comment){
        return request({
            url:`/eduservice/educomment/addComment`,
            method:'post',
            data:comment
        })
    }
}